package com.cxl.learn.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 崔学磊
 * @Date: 2022/3/25 19:38
 * @Description:
 */

@RestController
@RequestMapping(value = "/eureka-client")
public class EurekaClientController {

    @Value("${server.port}")
    private String port;

    @Value("${spring.application.name}")
    private String serverName;

    @GetMapping(value = "/demo")
    public String demo() {
        int i = 1/0;
        return "服务:"+serverName+",端口:"+port;
    }
}
